﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Bankeren.Engine
{
    /// <summary>
    /// This class is for sending player info over the network.
    /// </summary>
    [DataContract]
    public class PlayerInfo
    {
        #region Fields

        private string name;
        private string nameColor;
        private Avatar avatar;

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the name in the current <see cref="PlayerInfo"/> object.
        /// </summary>
        [DataMember]
        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }

        [DataMember]
        public string NameColor
        {
            get { return this.nameColor; }
            set { this.nameColor = value; }
        }

        [DataMember]
        public Avatar Avatar
        {
            get { return this.avatar; }
            set { this.avatar = value; }
        }

        #endregion

        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="PlayerInfo"/> class.
        /// </summary>
        /// <param name="name"></param>
        public PlayerInfo(string name, string nameColor, Avatar avatar)
        {
            this.name = name;
            this.nameColor = nameColor;
            this.avatar = avatar;
        }

        #endregion

        #region Methods

        public override string ToString()
        {
            return "[Name=" + name + ", NameColor=" + nameColor + ", Avatar=" + avatar + "]";
        }

        #endregion
    }
}
